Skip to content

Conversation

PoschmannChristianScheugenpflug

Client would like to immediately reconnect even if explicit disconnect is wished. Solved by add a second Disconnect method

  • Disconnect method set AutoReconnect to false
  • Added DisconnectAndReconnect method

Exception from ReadAsync when client was disposed

  • Catch exception if stream object is null after it client was disposed

Minor changes on demo (no pull needed) ;

Added DisconnectAndReconnect method;
Minor changes on demo;
{
if (readLength == 0)
{
Message?.Invoke(this, new AsyncTcpEventArgs("Connection closed remotely"));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message will be invoked even if connection was disconnected locally because readAsync always return 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant